﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package org.aswing.plaf.basic.background {
    import flash.display.*;
    import org.aswing.*;
    import org.aswing.geom.*;
    import org.aswing.plaf.*;
    import org.aswing.graphics.*;
    import org.aswing.plaf.basic.*;

    public class ToolTipBackground implements GroundDecorator, UIResource {

        protected var shape:Shape;

        public function ToolTipBackground(){
            this.shape = new Shape();
        }
        public function getDisplay(_arg1:Component):DisplayObject{
            return (this.shape);
        }
        public function updateDecorator(_arg1:Component, _arg2:Graphics2D, _arg3:IntRectangle):void{
            var _local4:ASColor;
            var _local5:ASColor;
            var _local6:StyleTune;
            var _local7:Number;
            this.shape.visible = _arg1.isOpaque();
            if (_arg1.isOpaque()){
                this.shape.graphics.clear();
                _arg2 = new Graphics2D(this.shape.graphics);
                _local4 = _arg1.getBackground();
                _local5 = _arg1.getMideground();
                _local6 = _arg1.getStyleTune();
                _arg2.beginFill(new SolidBrush(_local5));
                _local7 = _local6.round;
                _arg3 = new IntRectangle(0, 0, _arg1.width, _arg1.height);
                if (_local7 < 1){
                    _arg2.rectangle(_arg3.x, _arg3.y, _arg3.width, _arg3.height);
                } else {
                    BasicGraphicsUtils.drawRoundRect(_arg2, _arg3.x, _arg3.y, _arg3.width, _arg3.height, _local7);
                };
                _arg2.endFill();
                _arg2.beginFill(new SolidBrush(_local4));
                _local7 = (_local7 - 0.5);
                _arg3.grow(-1, -1);
                if (_local7 < 1){
                    _arg2.rectangle(_arg3.x, _arg3.y, _arg3.width, _arg3.height);
                } else {
                    BasicGraphicsUtils.drawRoundRect(_arg2, _arg3.x, _arg3.y, _arg3.width, _arg3.height, _local7);
                };
                _arg2.endFill();
            };
        }

    }
}//package org.aswing.plaf.basic.background 
